package com.gxa.service.community;



import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.conditions.query.QueryChainWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gxa.dto.communitydto.BuildingsDto;
import com.gxa.entity.community.Buildings;
import com.gxa.entity.community.Community;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author yjl
 * @since 2022-10-11 10:05:38
 */
public interface BuildingsService{
    //查询所有数据
    //分页查询
    List<Buildings> query();
    //分页查询
    List<Buildings> query(Integer pageNum,Integer pageSize);
    Map<String,Object> queryAll(BuildingsDto buildingsDto,Integer pageNum, Integer pageSize);
    //添加
    void add(Buildings buildings);
    //通过id删除
    void deleteById(@Param("id")Integer id);
    //通过id查询
    BuildingsDto queryById(Integer id);
    //编辑
    void update(Buildings buildings);


//    Page<BuildingsDto> finPage(@Param("page") Page<BuildingsDto> page, @Param(Constants.WRAPPER) QueryWrapper<BuildingsDto> qw);

//    public IPage<BuildingsDto> findByPage(Page<BuildingsDto> page, QueryWrapper<BuildingsDto> queryWrapper);

    //判断编码是否重复
    List<Buildings> queryByNum(String buildNum);
}
